Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Programming exercises: Add group feedback feature to feedback analysis table #9884

Conversation

az108
Copy link
Contributor

@az108 az108 commented Nov 27, 2024

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) and too complex database calls.
  • I strictly followed the principle of data economy for all database calls.
  • I strictly followed the server coding and design guidelines.
  • I added multiple integration tests (Spring) related to the features (with a high test coverage).
  • I added pre-authorization annotations according to the guidelines and checked the course groups for all new REST Calls (security).
  • I documented the Java code using JavaDoc style.

Client

  • Important: I implemented the changes with a very good performance, prevented too many (unnecessary) REST calls and made sure the UI is responsive, even with large data (e.g. using paging).
  • I strictly followed the principle of data economy for all client-server REST calls.
  • I strictly followed the client coding and design guidelines.
  • Following the theming guidelines, I specified colors only in the theming variable files and checked that the changes look consistent in both the light and the dark theme.
  • I added multiple integration tests (Jest) related to the features (with a high test coverage), while following the test guidelines.
  • I added authorities to all new routes and checked the course groups for displaying navigation elements (links, buttons).
  • I documented the TypeScript code using JSDoc style.
  • I added multiple screenshots/screencasts of my UI changes.
  • I translated all newly inserted strings into English and German.

Motivation and Context

This is a follow-up to the feature I’m working on: #9810. The goal is to provide instructors with clearer insights into the feedback given to students. In this PR, a “Group Feedback” feature has been introduced. This feature allows instructors to group similar feedback (similarity > 90%), ensuring that the table remains manageable without an overwhelming number of individual entries. This is particularly useful in scenarios where test cases utilize random values, leading to feedback that differs only slightly (e.g., by numbers) while the rest of the content remains identical.

Description

A new toggle was added along with a corresponding flag to indicate whether Levenshtein grouping should be applied. Depending on the toggle’s state (true or false), the server now either groups the feedback using Levenshtein or skips the grouping. Unfortunately, Levenshtein grouping can be resource-intensive (Cpu), which is why a loading indicator was added to enhance user experience during the processing (maximum waiting time of up to 10 seconds for very very large courses).

Additionally, since Levenshtein grouping cannot be applied directly within a query, manual pagination is required when the toggle is activated.

The Affected Students Modal has been refactored. It no longer attempts to send all feedback IDs but instead uses only the first five IDs for the feedback detail text. This change alters the way the modal is used, and it has therefore been renamed to Affected Students Sample, as it now displays up to five affected students per server request. The number 5 was chosen because five example repositories should be sufficient to identify the cause of specific bad feedback in a test case.

Steps for Testing

Prerequisites:

  • 1 Instructor
  • Student Sumbissions
  • 1 Programming Exercise
  1. Log in to Artemis
  2. Navigate to a Course with Instructor rights
  3. Create a Programming Exercise or use an existing one
  4. Solve the Programming Exercise as Students, ideally with different kinds of Progress (You can use artemis test users for this)
  5. Make sure you have two identical feedbacks in one testcase (similarity > 90 percent). You might need to adjust testcases by editing them for the programming exercises
  6. Navigate as Instructor to the Grading of an Exercise
  7. Navigate to the Feedback Analysis section
  8. Verify that the table displays data correctly, and press the group feedback toggle
  9. Verify that the two similar feedbacks were grouped into one feedback and count was updated correctly

Testserver States

Note

These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.







Review Progress

Performance Review

  • I (as a reviewer) confirm that the client changes (in particular related to REST calls and UI responsiveness) are implemented with a very good performance even for very large courses with more than 2000 students.
  • I (as a reviewer) confirm that the server changes (in particular related to database calls) are implemented with a very good performance even for very large courses with more than 2000 students.

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Performance Tests

  • Test 1
  • Test 2

Test Coverage

Class/File Line Coverage Confirmation (expect)
feedback-analysis.component.ts 93%
feedback-analysis-affected-students-modal.component.ts 95%
Methods in ResultService all over 90%

Screenshots

Before:
image

After:
image
image

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced a grouping feature for feedback based on test cases.
    • Enhanced feedback detail structures to support multiple feedback texts and additional parameters.
    • Updated user interface elements, including modals and tables, for improved clarity and usability.
    • Added new properties and functionalities in various components to manage feedback more effectively.
  • Bug Fixes

    • Resolved issues with loading states and data fetching logic in feedback analysis.
  • Documentation

    • Updated localization files to reflect new features and improve user guidance.
  • Refactor

    • Streamlined data structures and method signatures for better performance and maintainability.
    • Adjusted internal logic in services and components to accommodate new data formats.
  • Tests

    • Expanded test coverage to include new feedback structures and grouping functionality.
    • Updated tests to reflect changes in method signatures and data formats.

az108 and others added 30 commits November 10, 2024 21:43
…g-exercises/add-affected-students-to-analysis-table
…d-affected-students-to-analysis-table' into feature/programming-exercises/add-affected-students-to-analysis-table
…d-affected-students-to-analysis-table' into feature/programming-exercises/add-affected-students-to-analysis-table
…g-exercises/add-communication-feature-to-analysis-table

# Conflicts:
#	src/main/java/de/tum/cit/aet/artemis/assessment/web/ResultResource.java
#	src/main/java/de/tum/cit/aet/artemis/exercise/repository/StudentParticipationRepository.java
#	src/main/webapp/app/exercises/programming/manage/grading/feedback-analysis/feedback-analysis.component.html
#	src/main/webapp/app/exercises/programming/manage/grading/feedback-analysis/feedback-analysis.component.ts
#	src/main/webapp/app/exercises/programming/manage/grading/feedback-analysis/feedback-analysis.service.ts
#	src/main/webapp/i18n/de/programmingExercise.json
#	src/main/webapp/i18n/en/programmingExercise.json
…g-exercises/add-communication-feature-to-analysis-table
Copy link

@ahbitaqu ahbitaqu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Tested on TS1]
reapprove

Copy link

@sachmii sachmii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on TS1, reapprove

Copy link
Contributor

@SimonEntholzer SimonEntholzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code

Copy link

@HawKhiem HawKhiem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reapprove

Copy link
Contributor

@MarkusPaulsen MarkusPaulsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Server-code looks good + Tested group-feature on TS3

@az108 az108 requested a review from a team as a code owner December 17, 2024 10:09
@az108 az108 added ready to merge maintainer-approved The feature maintainer has approved the PR deploy:artemis-test2 and removed ready for review labels Dec 17, 2024
@az108 az108 temporarily deployed to artemis-test2.artemis.cit.tum.de December 17, 2024 12:56 — with GitHub Actions Inactive
@krusche krusche merged commit 8fafdee into develop Dec 20, 2024
51 of 58 checks passed
@krusche krusche deleted the feature/programming-exercises/add-grouping-feature-to-analysis-table branch December 20, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assessment Pull requests that affect the corresponding module client Pull requests that update TypeScript code. (Added Automatically!) communication Pull requests that affect the corresponding module core Pull requests that affect the corresponding module exercise Pull requests that affect the corresponding module maintainer-approved The feature maintainer has approved the PR ready to merge server Pull requests that update Java code. (Added Automatically!) tests
Projects
Status: Merged
Status: Done
Development

Successfully merging this pull request may close these issues.